package com.peas.platform.module.icims.expenditure.setting.adapter.repository.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.*;

// 收支系统配置
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_expenditure_settings`")
public class ExpenditureSettingsPo extends BasePo {

    // 配置类型
    // 枚举取值:ExpenditureSettingsType
    @Comment(value = "配置类型", enumType = "ExpenditureSettingsType")
    @NotBlank(message = "配置类型不能为空")
    @Size(max = 20, message = "配置类型不能超过20个字符")
    @TableField(value = "`settings_type`", jdbcType = JdbcType.VARCHAR)
    private String settingsType;

    // 配置说明
    @Comment(value = "配置说明")
    @Size(max = 1000, message = "配置说明不能超过1000个字符")
    @TableField(value = "`settings_desc`", jdbcType = JdbcType.VARCHAR)
    private String settingsDesc;

    // 配置值
    // 1启用，0不启用
    // 枚举取值:CommonYesNo
    @Comment(value = "配置值", enumType = "CommonYesNo")
    @NotBlank(message = "配置值不能为空")
    @Size(max = 20, message = "配置值不能超过20个字符")
    @TableField(value = "`settings_value`", jdbcType = JdbcType.VARCHAR)
    private String settingsValue;

    // 排序权重
    @Comment(value = "排序权重")
    @TableField(value = "`weight`", jdbcType = JdbcType.INTEGER)
    private Integer weight;

}
